package com.codebo.yunpicturebackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.codebo.yunpicturebackend.model.dto.user.*;
import com.codebo.yunpicturebackend.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.codebo.yunpicturebackend.model.vo.LoginUserVO;
import com.codebo.yunpicturebackend.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 25912
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-08-11 17:51:42
*/
public interface UserService extends IService<User> {

    long userRegister(UserRegisterDTO userRegisterDTO);

    LoginUserVO userLogin(UserLoginDTO userLoginDTO, HttpServletRequest httpServletRequest);

    boolean userLogout(HttpServletRequest httpServletRequest);

    long addUser(UserAddDTO userAddDTO);

    User getUserById(Long id);

    boolean updateUser(UserUpdateDTO userUpdateDTO);


    LoginUserVO getLoginUserVO(User user);

    UserVO getUserVO(User user);

    List<UserVO> getUserVOList(List<User> user);

    QueryWrapper<User> getQueryWrapper(UserQueryDTO userQueryDTO);

    boolean isAdmin(User  user);



//--------------------------------------------------------------------------------
    User getcurrentUser(HttpServletRequest httpServletRequest);



}
